<template>
    <div class="container hospital-list">
        <div class="hospital-card hd-shadow"  v-for="(item, index) in storelist" :key="index">
            <div class="hospital-img">
                <img :src="item.img" class="hd-img-responsive"/>
            </div>
            <div class="card-bottom">
                <div class="item-left van-hairline--right">
                    <div class="title">{{item.name}}</div>
                    <div class="address"><van-icon name="location" />{{item.address}}</div>
                </div>
                <van-icon name="phone" class="item-right" />
            </div>
        </div>
        <div class="hospital-card hd-shadow">
            <div class="hospital-img">
                <img src="http://city-card.oss-cn-hangzhou.aliyuncs.com/guarantee_medical/hostipal_02.png" class="hd-img-responsive"/>
            </div>
            <div class="card-bottom">
                <div class="item-left van-hairline--right">
                    <div class="title">沈阳陆军总院</div>
                    <div class="address"><van-icon name="location" />辽宁省沈阳市和平区三好街36号</div>
                </div>
                <van-icon name="phone" class="item-right" />
            </div>
        </div>
        <van-tabbar v-model="active" style="z-index:2;">
            <van-tabbar-item icon="dianfuyewu" to="/guarantee_medical_index">垫付医疗</van-tabbar-item>
            <van-tabbar-item icon="hezuoyiyuan" to="/guarantee_medical_hospital">合作医院</van-tabbar-item>
            <van-tabbar-item icon="shiyongshuoming" to="/guarantee_medical_tips">使用说明</van-tabbar-item>
            <van-tabbar-item icon="jiuyixuqiu" to="/guarantee_medical_record">就医记录</van-tabbar-item>
            <van-tabbar-item icon="mujuanzijin" to="/guarantee_medical_fund">爱心募捐</van-tabbar-item>
        </van-tabbar>
    </div>
</template>

<script>
export default {
  name: 'hospital',
  data () {
    return {
      value: 1,
      storelist: []
    }
  },
  methods: {
    init () {
      this.$http({
        fun: 'storelist',
        requestType: 'get',
        cb: res => {
          console.log(res)
          this.storelist = res.results
          this.storelist.forEach(item => {
            console.log('111')
          })
        }
      })
    },
    info (item) {
      console.log(item.id)
      this.$router.push({
        name: 'news_detail',
        query: {
          'id': item.id
        }
      })
    }
  },

  mounted () {
    this.init()
  }
}
</script>

<style src="./index.css" scoped>
</style>
